﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ReportLiabilities_Payment_Deadline_SUM_Receiver.ascx.cs" Inherits="ERP.Modules.Report.ReportLiabilities_Payment_Deadline_SUM_Receiver" %>

<%-------------------------------%>
<ext:Hidden ID="FormatTypeLiabilities_Payment_Deadline_SUM_Receiver" runat="server" />
<%--------------GridLiabilities_Payment_Deadline_SUM_Receiver-----------------%>
<ext:Panel runat="server" Layout="Fit" Border="False" ID="PanelLiabilities_Payment_Deadline_SUM_Receiver">
    <Content>
        <ext:GridPanel
            ID="grLiabilities_Payment_Deadline_SUM_Receiver"
            runat="server"
            Cls="grid-double"
            EnableColumnMove="true"
            Border="False">
            <Store>
                <ext:Store
                    ID="StoreLiabilities_Payment_Deadline_SUM_Receiver"
                    runat="server"
                    OnReadData="StoreLiabilities_Payment_Deadline_SUM_Receiver_RefreshData"
                    PageSize="20">
                    <Model>
                        <ext:Model ID="ModelLiabilities_Payment_Deadline_SUM_Receiver" runat="server">
                            <Fields>
                                <ext:ModelField Name="Customer_Alias" Type="String" />
                                <ext:ModelField Name="Customer_Name" Type="String" />
                                <ext:ModelField Name="VoucherAmount" Type="Int" />
                                <ext:ModelField Name="Remain" Type="Int" />
                                <ext:ModelField Name="Have_Receiver" Type="Int" />
                            </Fields>
                        </ext:Model>
                    </Model>
                </ext:Store>
            </Store>
            <ColumnModel runat="server">
                <Columns>
                    <ext:RowNumbererColumn ID="RowNumbererColumn1" runat="server" Text="STT" Width="30" Align="Center" />
                    <ext:Column ID="Column4" runat="server" Text="Mã khách hàng" Width="100" DataIndex="Customer_Alias" />
                    <ext:Column ID="Column5" runat="server" Text="Khách hàng" Width="180" DataIndex="Customer_Name" Flex="1" />
                    <ext:Column ID="Column6" runat="server" Text="Phải thu" Width="150" DataIndex="VoucherAmount" Align="Center">
                        <Renderer Handler="return indMoney(value);" />
                    </ext:Column>
                    <ext:Column ID="Column7" runat="server" Text="Đã thu" Width="150" DataIndex="Have_Receiver" Align="Center">
                        <Renderer Handler="return indMoney(value);" />
                    </ext:Column>
                    <ext:Column ID="Column8" runat="server" Text="Còn lại" Width="150" DataIndex="Remain" Align="Center">
                        <Renderer Handler="return indMoney(value);" />
                    </ext:Column>
                </Columns>
            </ColumnModel>
            <View>
                <ext:GridView ID="GridView1" runat="server" StripeRows="true" />
            </View>
            <DockedItems>
                <ext:Toolbar ID="ToolbarTopMain" runat="server" Dock="Top">
                    <Items>
                        <ext:Button ID="btnExport" runat="server" Text="Xuất tập tin" Icon="Printer">
                            <Menu>
                                <ext:Menu ID="MenuMain" runat="server">
                                    <Items>
                                        <ext:MenuItem ID="MenuItemExportXML" runat="server" Text="XML" Icon="PageCode">
                                            <Listeners>
                                                <Click Handler="submitValue(#{grLiabilities_Payment_Deadline_SUM_Receiver}, #{FormatTypeLiabilities_Payment_Deadline_SUM_Receiver}, 'xml');" />
                                            </Listeners>
                                        </ext:MenuItem>
                                    </Items>
                                </ext:Menu>
                            </Menu>
                        </ext:Button>
                        <ext:ToolbarSeparator />
                        <ext:SelectBox runat="server" ID="cbCustomer"
                            DisplayField="Customer_Name"
                            ValueField="Customer_ID"
                            EmptyText="Vui lòng chọn nhà cung cấp...">
                            <Store>
                                <ext:Store
                                    ID="StorecbCustomer"
                                    runat="server"
                                    OnReadData="StorecbCustomer_RefreshData"
                                    PageSize="20">
                                    <Model>
                                        <ext:Model runat="server" IDProperty="Customer_ID">
                                            <Fields>
                                                <ext:ModelField Name="Customer_Name" Type="String" />
                                            </Fields>
                                        </ext:Model>
                                    </Model>
                                </ext:Store>
                            </Store>
                            <DirectEvents>
                                <Select OnEvent="cbCustomer_Change">
                                    <EventMask ShowMask="true" Msg="Đang tải..."></EventMask>
                                </Select>
                            </DirectEvents>
                        </ext:SelectBox>
                    </Items>
                </ext:Toolbar>
                <ext:Toolbar ID="ToolbarPagging" runat="server" Dock="Bottom" AnchorHorizontal="100%">
                    <Items>
                        <ext:TriggerField ID="txtSearch" runat="server" Width="200" EnableKeyEvents="true" MarginSpec="0 8 0 0">
                            <Triggers>
                                <ext:FieldTrigger Icon="Search" />
                            </Triggers>
                            <DirectEvents>
                                <TriggerClick OnEvent="Search_Event"></TriggerClick>
                            </DirectEvents>
                        </ext:TriggerField>
                        <ext:PagingToolbar ID="PagingToolbarLiabilities_Payment_Deadline_SUM_Receiver" runat="server" StoreID="StoreLiabilities_Payment_Deadline_SUM_Receiver" BeforePageText="Trang" AfterPageText="của {0}" LastText="Cuối" NextText="Kế tiếp" PrevText="Trở lại" FirstText="Đầu" RefreshText="Làm tươi" DisplayInfo="true" DisplayMsg="Trang {0} - {1} của {2}" />
                    </Items>
                </ext:Toolbar>
            </DockedItems>
        </ext:GridPanel>
    </Content>
</ext:Panel>
